package com.tx.axure.tkaxureweb;

import com.tx.axure.tkaxureweb.servlet.FileServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

@MapperScan("com.tx.axure.tkaxureweb.mapper")
@SpringBootApplication
public class TkAxureWebApplication {
    public static void main(String[] args) {
        SpringApplication.run(TkAxureWebApplication.class, args);
    }

    @Bean
    public ServletRegistrationBean startServletRegist(){
        ServletRegistrationBean registrationBean=new ServletRegistrationBean(new FileServlet());
        registrationBean.addUrlMappings("/axure/*");
        return registrationBean;
    }

}
